the form of Web page access, but open the asp page in it, we can see some such code.Dim ei
Set ei = server. createobject ("easymail. InfoList ")
Username = Session ("wem ")
Ei. LoadMailBox username, trim (request ("mode "))
'-----------------------------------------
Anyone familiar with asp knows that it uses server. createobject is used to create an object. For example, server is used for data connection operations. createobject, while the variables
see some ofCode.
Dim
EI
Set
EI
=
Server. Createobject (
"
Easymail. infolist
"
)Username
=
Session (
"
Wem
"
)EI. loadmailbox username,
Trim
(Request (
"
Mode
"
))
'
-----------------------------------------
Anyone familiar with ASP knows that it uses server. createobject is used to create an object. For example, server is used for data connection operations. createobject, while the variables in ASP are
this problem in ASP. You can only directly use the CDO component (the parent component of CDONTS ):
Conf. fields [CdoConfiguration. cdoSMTPAuthenticate]. value = CdoProtocolsAuthentication. cdoBasic; conf. fields [CdoConfiguration. cdoSendUserName]. value = "brookes"; conf. fields [CdoConfiguration. cdoSendPassword]. value = "XXXXXXX ";
In. Net Framework 1.1, this requirement is clearly taken into account. The Fields set is added to the MailMessage component to easily increase the sender authen
sender authentication is as follows:
Ok? "; Mail. Fields.Add ("Http://schemas.microsoft.com/cdo/configuration/smtpauthenticate", "1"); Basic Authentication mail. Fields.Add ("Http://schemas.microsoft.com/cdo/configuration/sendusername", "Brookes"); Set your username here mail. Fields.Add ("Http://schemas.microsoft.com/cdo/configuration/sendpassword", "Walkor"); Set your password here smtpmail.smtpserver= "Lsg.moon.net"; Smtpmail.send (mail);
With this method, you can finally no longer need
authentication is as follows:
<%@ Import Namespace="System.Web.Mail" %><script runat="server">MailMessage mail=new MailMessage();mail.From="service@brookes.com";mail.To="brookes@brookes.com";mail.BodyFormat=MailFormat.Text;mail.Body="a test smtp mail.";mail.Subject="r u ok?";mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate", "1"); //basic authentication mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusername", "brookes"); //set your
to this problem in ASP. You can only directly use the CDO component (the parent component of cdonts ):Conf. Fields [cdoconfiguration. cdosmtpauthenticate]. value = cdoprotocolsauthentication. cdobasic;Conf. Fields [cdoconfiguration. cdosendusername]. value = "Brookes ";Conf. Fields [cdoconfiguration. cdosendpassword]. value = "xxxxxxx ";
In. NET Framework 1.1, this requirement is clearly taken into account. The fields set is added to the mailmessage component to easily increase the sender auth
addresses. The server response was:550 not local host ckocoo.com, not a gateway
Previously in ASP, there was no solution to this problem, and only the CDO component (CDONTS's parent component) could be used directly:
Conf. Fields[cdoconfiguration.cdosmtpauthenticate]. Value=cdoprotocolsauthentication.cdobasic;Conf. Fields[cdoconfiguration.cdosendusername]. Value= "Brookes";Conf. Fields[cdoconfiguration.cdosendpassword]. Value= "XXXXXXX";
This requirement is clearly
local host ckocoo.com, not a gateway
Previously in ASP, there was no solution to this problem, and only the CDO component (CDONTS's parent component) could be used directly:
conf.Fields[CdoConfiguration.cdoSMTPAuthenticate].Value=CdoProtocolsAuthentication.cdoBasic;conf.Fields[CdoConfiguration.cdoSendUserName].Value="brookes";conf.Fields[CdoConfiguration.cdoSendPassword].Value="XXXXXXX";
This requirement is clearly taken into account in the. Net Framework 1.1, which adds a fields set to the
Please configure the webeasymail before use, and make sure that it can send mail.
' ======= Send mail to Customer
' Create a MailSend object
Set mailsend = Server.CreateObject ("Easymail. MailSend ")
MailSend. CreateNew "xxxx", "temp" xxxxx is the sender's message
' Sender name
MailSend. Mailname = "xxxx" ' Mail name
MailSend. em_to = "xxxx" Recipient email address
MailSend. Em_subject = "XXXX" message subject
MailSend. Em_text = "XXXX" message conten
local host ckocoo.com, not a gateway
Previously in ASP, there was no solution to this problem, and only the CDO component (CDONTS's parent component) could be used directly:Conf. Fields[cdoconfiguration.cdosmtpauthenticate]. Value=cdoprotocolsauthentication.cdobasic;Conf. Fields[cdoconfiguration.cdosendusername]. Value= "Brookes";Conf. Fields[cdoconfiguration.cdosendpassword]. Value= "XXXXXXX";
This requirement is clearly taken into account in the. Net Framework 1.1, which adds a fields set to
authenticate user information , and we see that in the above program even the entire ASP.net mail part, does not consider the SMTP user authentication problem, so that we can not use an SMTP server, and must use a completely free SMTP server, such servers are now very few. So, if there are conditions, it is best to set up our own computer for the SMTP server, how to achieve, we can download Easymail software. The second is the speed of mail delivery,
Mail component |web| send mail to use before you configure the Webeasymail, and ensure that it can write to receive the letter.
' ======= Send mail to Customer
' Create a MailSend object
Set mailsend = Server.CreateObject ("Easymail. MailSend ")
MailSend. CreateNew "xxxx", "temp" xxxxx is the sender's message
' Sender name
MailSend. Mailname = "xxxx" ' Mail name
MailSend. em_to = "xxxx" Recipient email address
MailSend. Em_subject = "XXXX" m
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.